Skip to content

Conversation

@mingyen066
Copy link
Collaborator

@mingyen066 mingyen066 commented Oct 22, 2025

This patch implements
KIP-1205
to address concurrency issues (NPE) related to the lazy initialization
of RecordHeader fields.

The added test verified that concurrent access to RecordHeader.key()
and RecordHeader.value() no longer throws NullPointerException

Reviewers: TaiJuWu [email protected], Chia-Ping Tsai
[email protected]

@github-actions github-actions bot added triage PRs from the community clients small Small PRs labels Oct 22, 2025
@chia7712
Copy link
Member

@mingyen066 please update the upgrade.html as well

@github-actions github-actions bot removed the triage PRs from the community label Oct 23, 2025
Copy link
Collaborator

@TaiJuWu TaiJuWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chia7712
Copy link
Member

* What went wrong:
Execution failed for task ':clients:spotlessJavaCheck'.
> The following files had format violations:
      src/test/java/org/apache/kafka/common/header/internals/RecordHeadersTest.java
          @@ -28,7 +28,6 @@
           import·java.util.Iterator;
           import·java.util.concurrent.CompletableFuture;
           import·java.util.concurrent.CountDownLatch;
          -import·java.util.concurrent.atomic.AtomicBoolean;
           import·java.util.stream.Collectors;
           import·java.util.stream.IntStream;

@mingyen066 please fix the error

@mingyen066
Copy link
Collaborator Author

@chia7712 fixed.

@chia7712 chia7712 merged commit 8900a18 into apache:trunk Nov 2, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants